<?php

	
	//登陆
	Route::any('/login','LoginController@login')->name('admin.login');
	Route::get('/logout','LoginController@logout')->name('admin.logout');
	
Route::group(['middleware'=>'authok'],function(){
	Route::get('/index','IndexController@index')->name('admin.index');
	Route::get('/main','IndexController@main')->name('admin.main');	
	

	
	//文件上传
	
	Route::any('/file/upload','FileController@upload')->name('admin.file.upload');
	
	
	//用户管理
	Route::get('/adminuser/index','AdminUserController@index')->name('admin.adminuser.index');
	Route::any('/adminuser/add','AdminUserController@add')->name('admin.adminuser.add');
	Route::get('/adminuser/del','AdminUserController@del')->name('admin.adminuser.del');
	Route::any('/adminuser/edit','AdminUserController@edit')->name('admin.adminuser.edit');
	
	//角色
	Route::get('/role/index','RoleController@index')->name('admin.role.index');
	Route::any('/role/add','RoleController@add')->name('admin.role.add');
	Route::get('/role/del','RoleController@del')->name('admin.role.del');
	Route::any('/role/edit','RoleController@edit')->name('admin.role.edit');
	Route::any('/role/auth','RoleController@auth')->name('admin.role.auth');
	Route::post('/role/upauth','RoleController@upauth')->name('admin.role.upauth');
	
	//权限
	Route::get('/permission/index','PermissionController@index')->name('admin.permission.index');		
	Route::any('/permission/add','PermissionController@add')->name('admin.permission.add');
	Route::any('/permission/edit','PermissionController@edit')->name('admin.permission.edit');
    Route::get('/permission/del','PermissionController@del')->name('admin.permission.del');

	//订单
	Route::any('/order/index','OrderController@index')->name('admin.order.index');
	Route::get('/order/setshippingstatus','OrderController@setShippingStatus')->name('admin.order.setshippingstatus');
	Route::any('/order/setorderstatus','OrderController@setOrderStatus')->name('admin.order.setorderstatus');
	
	//商品管理
	Route::get('/goods/index','GoodsController@index')->name('admin.goods.index');
	Route::any('/goods/add','GoodsController@add')->name('admin.goods.add');
	Route::any('/goods/del/{id}','GoodsController@del')->name('admin.goods.del');
	Route::any('/goods/edit/{id?}','GoodsController@edit')->name('admin.goods.edit');
	Route::any('/goods/onsale','GoodsController@onSale')->name('admin.goods.onsale');
	Route::any('/goods/getspectpl','GoodsController@getSpecTpl')->name('admin.goods.getspectpl');
	Route::any('/goods/getspecinput','GoodsController@getSpecInput')->name('admin.goods.getspecinput');
	
	
	
	
	//分类管理
	Route::get('/goodscategory/index','GoodsCategoryController@index')->name('admin.goodscategory.index');
	Route::any('/goodscategory/add','GoodsCategoryController@add')->name('admin.goodscategory.add');
	Route::any('/goodscategory/del/{id}','GoodsCategoryController@del')->name('admin.goodscategory.del');
	Route::any('/goodscategory/edit','GoodsCategoryController@edit')->name('admin.goodscategory.edit');
	
	//微信配置
	Route::get('/wx/wxconf','WxController@wxconf')->name('admin.wx.wxconf');
	
	//系统配置
	Route::any('/config/siteconfig','ConfigController@siteconfig')->name('admin.config.siteconfig');
	Route::get('/config/printer','ConfigController@printer')->name('admin.config.printer');
	
	//会员
	Route::get('/user/index','UserController@index')->name('admin.user.index');
	Route::get('/user/useradd','UserController@userAdd')->name('admin.user.useradd');
	
	
	//商品类型
	Route::get('/goodstype/index','GoodsTypeController@index')->name('admin.goodstype.index');
	Route::any('/goodstype/add','GoodsTypeController@add')->name('admin.goodstype.add');
	Route::any('/goodstype/del/{id}','GoodsTypeController@del')->name('admin.goodstype.del');
	Route::any('/goodstype/edit/{id}','GoodsTypeController@edit')->name('admin.goodstype.edit');
	
	//商品规格
	Route::get('/spec/index','SpecController@index')->name('admin.spec.index');
	Route::any('/spec/add','SpecController@add')->name('admin.spec.add');
	Route::any('/spec/del/{id}','SpecController@del')->name('admin.spec.del');
	Route::any('/spec/edit/{id}','SpecController@edit')->name('admin.spec.edit');
	Route::any('/spec/sortup','SpecController@sortUp')->name('admin.spec.sortup');
});	